package view.action;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;


public abstract class ActionFactory implements Action {
	
	static Map<String, Action> actions = new HashMap <String, Action> ();
	
	public static Action getAction(HttpServletRequest request) {
		actions.put("/login.do", new ActionLogin());
		actions.put("/secured/showAll.do", new ActionShowAll());
		actions.put("/secured/findByTask.do", new ActionFindByTask());
		actions.put("/secured/preparedSearch.do", new ActionPreparedSearch());
		Action act =actions.get(request.getServletPath());
		return act;
	}
}
